using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SpawnBannersDebug : MonoBehaviour
{
	[SerializeField]
	private List<GameObject> bannersPrefabs = new List<GameObject>();

	[SerializeField]
	private int i;

	private void Update()
	{
		if (UnityEngine.Input.GetKeyDown(KeyCode.Space))
		{
			StartCoroutine(ShowBanner(UnityEngine.Object.Instantiate(bannersPrefabs[i]).GetComponent<PrecisionBannerAnimator>()));
		}
	}

	private IEnumerator ShowBanner(PrecisionBannerAnimator bannerAnimator)
	{
		yield return new WaitForSeconds(0.25f);
		bannerAnimator.AnimateBannerShow();
		yield return new WaitForSeconds(0.7f);
		bannerAnimator.AnimateBannerHide();
	}
}
